<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019\2\23 0023
 * Time: 16:05
 */

namespace app\validate;


class UserLotteryQualificationValidate extends ValidateBase
{
    protected $rule = [
        'lottery_type'=>'require',
        'user_mobile'=>'require|checkPhone',
        'num'=>'require|number|gt:0',
        'create_uid'=>'require|number',
        'create_time'=>'require|number',
    ];
    protected $message = [
        'lottery_type.require'=>'抽奖类型必须选择',
        'user_mobile.require'=>'请填写手机号码',
        'user_mobile.checkPhone'=>'手机号码错误',
        'num.require'=>'抽奖次数不能为空',
        'num.number'=>'抽奖次数有误',
        'num.gt'=>'抽奖次数有误',
        'create_uid.require'=>'未获取到添加人',
        'create_uid.number'=>'未获取到添加人',
        'create_time.number'=>'未获取到添加时间',
        'create_time.require'=>'未获取到添加时间',
    ];

    protected $scene =[
        'add'=>[
            'lottery_type',
            'user_mobile',
            'num',
            'create_uid',
            'create_time',
            ],
    ];

}